import { useState } from 'react';
import { Button } from "antd";
 
function MyCommont(props) {
 
    const [count, setCount] = useState(0)
 
    return (
        <div>
             <h1>{props.name}</h1>
            <h1>{count}</h1>
            <Button onClick={() => { setCount(count + 1) }}>点击按钮+1</Button>
        </div>
    )
}
 
export default MyCommont